

const layouts = {
	width: 1280,
	height: 720,
	bg: { // 相对于上级 (panel)
		x: 0, y: 0, width: 1280, height: 720,
	},
	seats: {
		x: 375, y: 0, width: 600, offsetX: 300, height: 720,
		borderLight: { // 相对于 Seat
			x: 115, y: 5, width:320, height:32, offset: 16,
		},
		borderDark: { // 相对于 Seat
			x: 107, y: 0, width:336, height:42, offset: 13, tintWidth: 100,
		},
		userName: { // 相对于 Seat
			x: 180, y: 13, font: 20
		},
		iconBox: { // 相对于 Seat
			x: 122, y: 10, width:22, height:22
		},
		avatar: { // 相对于 Seat
			x: 307, y: 5
		}
	},
	hpbar: {
		x: 0, y: 0,
		title: {
			x: 244, y: 135,
		},
		txCanyu: {
			x: 470, y: 90, height: 16
		},
		txCandidates: { // 数字
			x: 536, y: 75, height: 22, offsetX: 18,
		},
	},
	tips: {
		// 基础斜率: 720 / 720 = 1 / 1
		x: 820, y: 0, offsetX: 720, height: 720,
		mainBar: {
			width: 80, left: -40, srcX: 720, srcY: -720, dstX: -720, dstY: 720
		},
		subBar: {
			width: 200, left: -75, srcX: -720, srcY: 720, dstX: 720, dstY: -720
		},
		arrowA: {
			x: 0, y: 660, deltaX: -80, deltaY: 80,
		},
		arrowB: {
			x: 240, y: 580, deltaX: 80, deltaY: -80,
		},
		txBegin: {
			srcX1: 810, srcY1: -60, dstX1: 190, dstY1: 560,
			srcX2: 90, srcY2: 660, dstX2: -530, dstY2: 1280,
		}
	},
};

const color = {
	normal: '#5994ed', // 用于 hp 条的上面横线、参与人员文字, 基础是标准蓝色

	dark3: '#03131F', // 用于背景
	dark2: '#03346c', // 用于 seat 的深色外圈边框, 基础是黑蓝色
	dark1: '#096ad2', // 用于 seat 的内圈边框描边, 基础是深蓝色
	light1: '#1cccff', // 用于 seat 的内圈边框, 基础是天蓝色

	// 这三个颜色是原来的 dark 降对比度之后的颜色
	gDark3: '#0D1B2D',
	gDark2: '#151B35',
	gDark1: '#283071',

	tint: '#f6c81d', // 提示性颜色, 用于 seat 明显区分的部分, 基础是黄色
	tip: '#d38d32', // 提示性颜色, 用于 tips 明显区分的部分, 基础是橙色
	black: '#000000',
};

const colors = {
	blue: {
		normal: '#5994ed', light1: '#1cccff',
		dark3: '#03131F', dark2: '#03346c', dark1: '#096ad2',
		gDark3: '#0D1B2D', gDark2: '#151B35', gDark1: '#283071',
		tint: '#f6c81d', tip: '#d38d32',
		type: 'blue'
	},
	red: {
		normal: '#bc4d21', light1: '#fd8a5c',
		dark3: '#140402', dark2: '#621f10', dark1: '#bf3702',
		gDark3: '#2f1a17', gDark2: '#35211c', gDark1: '#985037',
		tint: '#6be0ea', tip: '#0d81c9',
		type: 'red'
	},
}

const assets = {
	bgSkyLine1Func: (context) => context.assetPath('assets/fallen_knight/skyline1.png'),
	bgSkyLine2Func: (context) => context.assetPath('assets/fallen_knight/skyline2.png'),
	bgSkyLine3Func: (context) => context.assetPath('assets/fallen_knight/skyline3.png'),
	bgSkyLine4Func: (context) => context.assetPath('assets/fallen_knight/skyline4.png'),
	bgSunlightFunc: (context) => context.assetPath('assets/fallen_knight/sunlight.png'),

	bgTmpTintFunc: (context) => context.assetPath('assets/fallen_knight/bg_tmp_tint.png'),
	hpBarFunc: (context) => context.assetPath('assets/fallen_knight/hpbar.png'),

	fontFangZhengFunc: (context) => context.commonAssetPath('fonts/fangzheng.ttf'),
};

const avatarsParam = {
	specter: {
		_color: 'red',
		bgTmpTintFunc: (context) => context.assetPath('assets/fallen_knight/avatar_specter_tint.png'),
	},
	fallen_knight: {
		_color: 'blue',
		bgTmpTintFunc: (context) => context.assetPath('assets/fallen_knight/bg_tmp_tint.png'),
	},
}

function updateAvatar(who) {
	Object.assign(assets, avatarsParam[who]);
	const _color = avatarsParam[who]._color;
	Object.assign(color, colors[_color]);
}
updateAvatar('fallen_knight');

const paths = {
	// 参与人数 4 个字
	canyu: 'M58,6l-2 -5h11l5,16H62l-2 -6l-3,5l-10 0l-1,6h27l-6,11H49l20,16H50l-11 -9 l-16,10H5l25 -16H9l2 -11h24l1 -6H11l1 -5l8 -11h12l-3,5H58z' // 参
			+ 'M4,64l2 -10L67,51l-4,10L4,64z'
			+ 'M2,77l2 -10L65,64l-4,10L2,77z'
			+ 'M0,91l2 -10L63,78l-4,10L0,91z'
			+ 'M72,73l2 -12h50l-6,12H72z' // 与
			+ 'M98,1l-1,5l49,0L140,18H94l-5,19h51l-6,43l-13,12l-11,0l2 -11h11l5 -31H75l2 -12l9 -36L98,1z'
			+ 'M180,0h13L180,28h10l12,63l-14,0l-10 -56l-25,57l-13,0L180,0z' // 人
			+ 'M234,77l9,13h-12l-5 -7l-7,7h-12l13 -13l-6 -8l1 -7h-3l2 -10h3l1 -4h9l-1,4h10l1 -5h9l-1,4h4l-4,10h-1l-1,7L234,77z' // 数
			+ 'M222,26h8l-6,17h-8L222,26z'
			+ 'M224,3h8l0,11h2L235,1h8l-2,13h1l3 -11h8l-3,11h4l-5,10H240l-3,17l-9,5l3 -22H219l2 -10h3L224,3z'
			+ 'M229,71l6 -5l1 -3h-9l-1,3L229,71z'
			+ 'M241,26h8l1,17h-8L241,26z'
			+ 'M253,21l8 -21h10'
			+ 'l-2,4h16l-5,11h-15l-2,5H253z'
			+ 'M265,39l7 -16h11l-14,35l5,32h-11l-2 -13l-5,13h-11l14 -32l-5 -31h11L265,39z',
	"1" : "M218,262h-42.8l17.5-82.3h134.5l-80,376.2L148.7,588L218,262z",
	"2" : "M92.1,328.2l2.4-11.4l2.4-11.1c5-23.6,9.4-41.8,13.1-54.6c3.7-12.8,9.5-24.4,17.4-34.9c7.9-10.4,15.4-17.9,22.6-22.4" +
			"c7.2-4.5,14.1-7.8,20.7-10c6.6-2.1,14.2-4,22.7-5.6c8.5-1.6,16.5-2.3,23.9-2.3h83.5c5.7,0,12.9,1.1,21.7,3.2" +
			"c8.8,2.2,15.9,4.4,21.2,6.9c5.3,2.4,9.8,5.6,13.5,9.5c3.7,3.9,6.7,8.1,9.2,12.5c2.5,4.4,4.6,9.9,6.3,16.6" +
			"c1.7,6.6,2.8,11.8,3.2,15.4c0.4,3.6,0.1,10-1,19.2c-1.1,9.2-1.9,15.7-2.4,19.5s-2.2,12.4-5,25.6c-4.7,21.3-8.7,36.5-11.9,45.6" +
			"c-3.2,9.1-6.4,16.5-9.6,22.3c-3.2,5.8-7,11.6-11.4,17.6c-4.4,6-9.2,11.4-14.3,16.4c-5.2,5-11.8,9.1-19.8,12.5" +
			"c-8,3.3-13.9,5.4-17.6,6.2c-3.7,0.8-19.4,2.7-47.2,5.9l-42.6,6.2c-9.4,1.2-16.2,2.7-20.3,4.7c-4.1,2-7.8,4.8-10.9,8.6 s-5.5," +
			"8.1-7.1,12.7l-4.6,19l-1.6,6.2c-1,3.9-0.9,6.7,0.2,8.5c0.5,1.2,1.4,2.2,2.7,2.9c1.3,0.8,2.6,1.2,4,1.3" +
			"c1.3,0.1,5.6,0.1,12.9,0.1H327l-52,82H38.3L59,485.2c4.1-19.1,7.4-32,10.1-38.7c2.7-6.6,6.1-14.4,10.2-23.3" +
			"c4.1-8.9,9.3-17,15.4-24.3c6.1-7.3,12.3-13.1,18.4-17.4c6.1-4.3,12.5-7.9,19.1-10.8c6.7-2.9,14.7-5.5,24.2-7.8" +
			"c9.5-2.2,20.9-4.1,34.3-5.6c13.4-1.5,21.8-2.6,25.3-3.4l9.5-1.8c13.3-2,21.8-3.5,25.4-4.5c3.6-1.1,7.2-3.6,10.7-7.5" +
			"c3.5-3.9,6.3-9.9,8.6-17.9l5.6-22.3c5.3-19.3,6.2-31.4,2.7-36.3c-3.1-3.9-6.2-6.1-9.4-6.6c-3.2-0.5-9.5-0.7-18.9-0.7h-24.6" +
			"c-6.8,0-12.8,1.2-17.9,3.5c-5.1,2.3-9.1,4.8-12,7.5s-6.4,11.2-10.4,25.6c-4.1,14.5-6.3,23.2-6.8,26.4l-1.9,8.8H92.1z",
	"3" : "M131.9,415.2l16.8-78.8h92c4.1,0,9.2-0.7,15.3-2.2c6.1-1.5,10.6-3.3,13.6-5.4c3-2.1,5.5-5.1,7.6-8.9" +
			"c2.1-3.8,4.3-11.1,6.7-22c2.4-10.8,3.1-18.5,2.1-23c-1.4-5.5-3.9-9.3-7.5-11.4c-3.6-2.1-9-3.2-16-3.2h-45.1" +
			"c-10.7,0-18.5,1.8-23.2,5.3c-4.8,3.5-7.8,6.2-9.2,7.9c-1.4,1.8-3,7.4-5.1,17l-4,19H97.3c0.9-4.3,1.5-7.4,1.8-9.4" +
			"c0.3-2,1.3-7.3,3-16c1.7-8.7,3.5-16.8,5.5-24.5c4.6-18.2,10.7-32.4,18.3-42.6c7.5-10.3,14.8-17.5,21.6-21.8" +
			"c6.9-4.3,14.6-8.3,23.1-12c8.5-3.7,20.7-5.6,36.5-5.6h113.1c5.9,0,13.2,1.3,22,4c8.8,2.6,16.7,7.1,23.7,13.3" +
			"c7,6.3,11.5,15.4,13.5,27.4c2,12,2.5,23,1.3,33c-1.1,10-3.1,21.1-5.9,33.4c-3.5,14.5-7.4,27.1-11.7,37.9s-8.7,18.2-13.1,22.1" +
			"l-17.6,17.9c5.1,7.4,8.7,13.4,10.8,18c2.1,4.6,3.6,9.7,4.4,15.2c0.8,5.6,1,12.6,0.6,21.2c-0.4,8.6-3,23.9-7.9,46" +
			"c-3.3,13.5-6,23.6-8.4,30.5c-2.3,6.8-5.8,14.7-10.3,23.7c-4.5,9-9.1,16.3-13.6,22c-4.5,5.7-11,11.7-19.4,18.2" +
			"c-8.4,6.4-14.9,10.5-19.5,12.3c-4.6,1.8-12.5,3.7-23.6,5.7c-11.2,2.1-18.3,3.1-21.5,3.1h-76.2l-26.8,0.6" +
			"c-9.1-0.2-18.1-1.6-26.8-4.1c-8.7-2.5-16.3-6.7-22.7-12.6c-6.4-5.9-11.1-15.1-14.2-27.8c-3.1-12.7-3.7-24.6-1.8-35.6" +
			"c1.9-11,3.7-20.9,5.6-29.7l3.8-17.9H148c-2,8.6-3.6,16.2-4.9,22.9c-1.2,6.6-0.9,11.2,0.9,13.8c1.8,2.5,4,4.2,6.6,5" +
			"c2.6,0.8,8,1.2,16.2,1.2h43.1c10,0,18.2-2.1,24.7-6.2c6.5-4.1,11.5-11.5,14.8-22.3c3.4-10.7,5.3-21.2,5.9-31.3" +
			"c0.3-7.8-0.8-13.6-3.3-17.4c-2.5-3.8-6.5-5.7-12-5.7H131.9z",
	"4" : "M371.5,178.2l-53.6,252.2h36.9l-42.2,82.9h-12.3L291,557l-92.5,31.3l15.9-75H50.4l22.5-106.1l219.5-229.1H371.5z" +
			"M151.8,430.4h80.3l22.1-104L151.8,430.4z",
	"5" : "M77.6,426.9L130.2,179h261.6l-46.7,82H197.8l-12.4,58.3c-0.6,2-1,3.7-1.1,5.3c-0.1,1.6,0.1,2.6,0.8,3.2" +
			"c0.7,0.6,2.2,0.5,4.7-0.3l10.8-3.8c4.8-1.6,10.9-2.3,18.4-2.3h64.2c8,0,18.2,1.8,30.5,5.4c12.3,3.6,21.5,10.8,27.5,21.5" +
			"c6,10.7,8.9,22.7,8.7,35.7c-0.2,13.1-2,28.5-5.3,46.1c-3.3,17.7-6.2,31.9-8.9,42.6c-2.9,10.9-5.7,19.9-8.5,26.8" +
			"c-2.7,6.9-6.9,15.8-12.6,26.7c-5.6,10.8-11.2,19.1-16.8,24.8c-5.6,5.7-11.1,10.3-16.6,13.9c-5.5,3.6-11.3,6.6-17.5,9.1" +
			"c-6.2,2.4-13.1,4.4-20.7,5.9c-7.6,1.5-16.2,2.6-25.8,3.4c-9.5,0.8-30.1,0.7-61.8-0.3c-17.5-0.4-30-0.9-37.6-1.6" +
			"c-7.6-0.7-14.7-2.1-21.3-4.4c-6.7-2.2-12.5-5.6-17.6-10.1c-5.1-4.5-9-9.4-11.8-14.8c-2.8-5.4-5-11.3-6.8-17.7" +
			"c-1.8-6.4-2.7-14.4-2.7-23.7s0.5-16.8,1.7-22.3l6.8-39h86.4c-2.7,8-4.2,15.7-4.6,23.1c-0.4,7.4,2.8,13.9,9.5,19.5" +
			"s17.4,8.3,32.1,8.3c9.5,0.2,19.2-1.3,28.9-4.4c9.7-3.1,16.8-8,21.2-14.5c4.4-6.5,8.1-16.6,11-30.3c2.3-11.9,3.2-21,2.7-27.2" +
			"c-0.5-6.2-2.9-10.7-7.1-13.3c-4.2-2.6-10-4-17.5-4h-37.2c-9,0-14.3,1.1-15.9,3.2l-18.3,17H77.6z",
	"6" : "M280.4,316.2c0.2-2.9,0.7-7,1.4-12.3c0.7-5.3,1.1-10.4,1.1-15.5c0-5.1-1.4-10.7-4.2-17c-2.8-6.2-7.9-9.4-15.3-9.4h-36" +
			"c-12.1,0-21.6,3.8-28.5,11.3c-6.9,7.5-11.5,15.2-13.9,23.1c-2.4,7.9-4.3,16-5.9,24.2c-1,4.9-1.8,8.7-2.3,11.6" +
			"c-0.5,2.8-0.3,5.1,0.5,6.7c0.8,1.7,1.7,2.5,2.5,2.6c0.9,0.1,2.7-0.9,5.6-3.1c2.9-2.1,7.7-3.8,14.5-4.8c6.8-1.1,13.9-1.6,21.3-1.6" +
			"H277c9.6,0,17.3,0.6,23.2,1.9c5.9,1.3,11.4,3.3,16.4,6c5.1,2.7,9.5,5.6,13.4,8.6c3.8,3,7,6.6,9.4,10.7c2.4,4.1,4.3,10.4,5.7,18.9" +
			"c1.3,8.5,2,16.2,2,23c0,6.8-0.7,16.2-2.1,28c-1.4,11.8-4.2,25.6-8.4,41.5c-2.5,8.8-5,17-7.6,24.8c-2.6,7.7-5.1,14.5-7.5,20.2" +
			"c-2.4,5.8-6.1,12.5-11,20.2c-5,7.7-10.2,14.3-15.6,19.6c-5.4,5.4-10.8,9.7-16.1,12.9c-5.3,3.2-11.2,6.1-17.6,8.5" +
			"c-6.5,2.4-13.2,4.1-20.1,5c-6.9,0.9-15.7,1.3-26.2,1.3c-16.7,0.4-35.5,0.4-56.4,0c-20.9-0.4-35.8-0.9-44.5-1.5" +
			"c-8.8-0.6-15.9-2.1-21.6-4.7c-5.6-2.5-10.7-5.9-15.3-10c-4.6-4.1-7.9-7.6-9.8-10.5c-1.9-2.9-4.1-7.6-6.4-13.9" +
			"c-2.4-6.3-3.8-13.8-4.3-22.4c-0.5-8.6-0.2-18.2,1-28.7c1.2-10.5,3.2-22.9,6.2-36.9l34.6-162.6c0.6-2.9,3-10.6,7.2-23" +
			"c4.2-12.4,7.9-22,11.2-28.7c3.3-6.7,7.2-13.2,11.9-19.3c4.6-6.2,9.1-11.4,13.3-15.8c4.3-4.4,10.7-9.1,19.4-14.1" +
			"c8.7-5,17.3-8.4,25.8-10.4c8.5-2,18.6-2.9,30.4-2.9h92.3c10.7,0,19,0.6,24.8,1.9c5.8,1.3,11.8,4.1,18,8.5" +
			"c6.2,4.4,11,9.1,14.3,14.1c3.3,5,6.2,11,8.6,18.2c2.4,7.1,3.7,15.2,3.9,24.3c0.2,9.1-0.4,18.4-1.8,27.8" +
			"c-1.4,9.5-3.5,20.2-6.2,32.1l-2.8,11.7H280.4z M195.2,416.3c-10,1-18,2.9-24.2,5.7c-6.2,2.8-10.6,6.3-13.2,10.5" +
			"c-2.7,4.2-5.2,13-7.7,26.5c-2.6,13.3-3.5,22.1-2.6,26.5c0.9,4.4,3.8,7.7,8.6,10c4.8,2.2,11.2,3.4,19.2,3.4c2.5,0.2,9.5,0.2,21.1,0" +
			"c11.6-0.2,20.4-1.6,26.5-4.1c6.1-2.5,10.8-6.2,14-10.8c3.2-4.7,6.2-12.9,8.7-24.6c2.6-11.7,3.7-19.6,3.4-23.7" +
			"c-0.9-8.8-2.7-13.3-5.6-13.5l-23.1-5.9H195.2z",
	"7" : "M213.1,350.1l59.5-82.9H104.8l18.6-87.6h270.7l-19.2,90.5L247,444.5l-98.5,138.3H40.9L213.1,350.1z",
	"8" : "M243.2,582.2h-116c-15.6,0-25.7-0.5-30.1-1.6c-4.5-1.1-10-3.7-16.7-7.8c-6.6-4.1-11.8-9.4-15.5-16" +
			"c-3.7-6.5-5.9-13.9-6.6-22c-0.7-8.1-0.7-18.8,0-32.2c0.7-13.4,5.2-34.4,13.4-63.1c4.5-15.8,8.8-27.2,12.7-34.3" +
			"c3.9-7,8.8-13.4,14.5-19.2c5.7-5.8,8.8-9.7,9.3-11.9c0.1-1.4-0.6-4.2-2.1-8.5c-1.5-4.3-2.8-9.8-4-16.6c-1.1-6.7-1.8-12.5-2.1-17.1" +
			"c-0.3-4.7,0.5-13.4,2.5-26.1c1.9-12.7,4.4-24.2,7.3-34.6c1.1-4.3,2.7-9.5,4.6-15.7c2-6.2,4.5-12.9,7.7-20.2" +
			"c3.1-7.3,7.9-15,14.4-23.1c6.5-8.1,12.9-14.3,19.2-18.6c6.3-4.3,11.7-7.3,16.3-9.1c4.6-1.8,9.7-3.2,15.3-4.2" +
			"c5.6-1.1,10.6-1.6,15.1-1.6h110.4c13.3,0,21.8,0.4,25.6,1.3c3.8,0.9,8.1,2.6,12.8,5.3c4.7,2.6,8.6,5.4,11.6,8.3" +
			"c3,2.9,5.8,7.5,8.4,13.8c2.6,6.3,4.3,14.7,5.1,25.5c0.8,10.7,0.2,22.6-2,35.6c-2.2,13-4.4,23.9-6.7,32.7" +
			"c-2.5,9.2-5.5,18.4-8.9,27.5c-3.4,9.2-8.4,17.8-15,25.9c-6.6,8.1-10.2,12.7-10.9,13.9c-0.6,1.2-1,2.6-0.9,4.4" +
			"c-0.2,0.8,1.1,4.2,3.9,10.1c2.7,6,4.6,11.8,5.7,17.4c1,5.7,1.7,10.7,1.9,15.1s-1.4,16.5-4.9,36.2c-3.5,19.7-6.4,33.4-8.6,41" +
			"c-2.7,9.2-6,18.3-9.9,27.4c-3.9,9.1-7.6,16.3-11.2,21.7c-3.6,5.4-9.5,11.8-17.9,19.3c-8.3,7.5-16.2,12.9-23.6,16.1" +
			"S251.8,582.2,243.2,582.2z M252.4,333.4c4.3-0.8,7.8-1.8,10.6-2.9c2.8-1.2,5.8-3.6,9.1-7.2c3.3-3.6,6.8-12.9,10.6-27.8" +
			"c3.8-14.9,3.7-25-0.1-30.3c-3.9-5.3-9.7-7.9-17.5-7.9h-40.7c-10.4,0-18.6,3.2-24.9,9.5c-6.2,6.3-10.4,16.3-12.5,29.7" +
			"c-1.6,8.4-2.4,14.8-2.3,19.2c0,4.4,0.9,8.5,2.5,12.2c1.7,3.7,6.8,5.6,15.4,5.6H252.4z M231.7,414.3h-33.1" +
			"c-9.4,0-16.2,0.7-20.4,2.2c-4.2,1.5-8.2,4.2-12,8.3s-6.4,8.6-7.8,13.5c-1.4,4.9-3.9,14.5-7.3,28.9c-3.4,14.4-3.2,24.3,0.7,29.9" +
			"c3.9,5.6,11.3,8.3,22.2,8.3h31.6c8,0,14.7-0.7,19.9-2.2c5.3-1.5,9.1-3.5,11.4-6c2.3-2.5,4.3-5.6,6.1-9.2c1.7-3.6,3.6-8.9,5.4-16" +
			"l2.3-9.4c5.3-21.3,5.9-34.7,1.9-40.1C248.7,417,241.7,414.3,231.7,414.3z",
	"9" : "M146.9,445.4c-1.5,6.1-3,13-4.6,20.9c-1.6,7.9-1.2,14.2,1.1,18.9c2.3,4.7,6.3,8,12,9.8c5.7,1.9,12.5,2.8,20.5,2.8h29.6" +
			"c10.7,0,19.3-1.8,25.6-5.3s11.2-7.3,14.7-11.3c3.5-4,6.1-8.6,7.9-13.9c1.8-5.3,3.6-12,5.3-20.2l8.2-38.7" +
			"c-7.5,5.1-14.1,8.8-19.8,11.1c-5.7,2.3-14.4,3.5-26.1,3.5h-51.6c-21.7,0-35.4-0.5-41.3-1.5c-5.8-1-11.6-3.2-17.2-6.7" +
			"c-5.6-3.5-10.8-8.9-15.6-16.3c-4.8-7.3-7.3-15.8-7.6-25.5c-0.3-9.7,0.1-19.3,1.2-28.9c1.1-9.6,3.1-21.4,6.1-35.4" +
			"c3-14.1,6.3-27.5,10.1-40.4c4.5-15.6,9.3-28.1,14.6-37.5c5.2-9.4,11.4-17.8,18.5-25.2c7.1-7.4,14.4-13,21.7-16.8" +
			"c7.4-3.8,14.6-6.6,21.7-8.3c7.1-1.8,14.4-2.6,21.8-2.6h94c17.4,0,28.7,0.5,34.1,1.6c5.3,1.1,11.4,3.6,18.3,7.6" +
			"c6.9,4,12.3,8.7,16.3,14.1c4,5.4,7.4,11.9,10.1,19.5c2.7,7.6,4.2,14.3,4.7,19.9c0.5,5.7-0.7,18.3-3.5,37.8" +
			"c-2.8,19.5-5.4,34.9-7.7,46l-27.4,128.9c-3,14.3-7.3,28.5-12.9,42.6c-5.6,14.2-11.6,26.4-18.1,36.8c-6.5,10.4-14.7,19.5-24.6,27.5" +
			"c-9.9,8-20,13.4-30.4,16.1c-10.4,2.7-19,4.4-25.8,5.1c-6.9,0.7-13.3,1-19.1,1h-87.9c-7.8,0-14.7-1-20.6-2.9" +
			"c-5.9-2-11-3.9-15.3-5.9c-4.3-2-7.2-3.6-8.8-4.8c-1.6-1.3-3.9-3.9-7-7.9c-3.1-4-5.3-7.3-6.8-9.8c-1.5-2.5-3.1-6.5-4.8-12" +
			"c-1.7-5.5-3.3-12.8-4.9-22c-1.6-9.2,0.5-26.4,6.3-51.6l4.6-20.2H146.9z M273,260.2h-45.1c-13.9,0-22.2,0.4-24.9,1.3" +
			"c-2.7,0.9-5.7,3.1-9,6.7c-3.3,3.6-5.7,7.4-7.2,11.3c-1.5,3.9-3.4,10.1-5.5,18.5c-2.2,8.4-3.3,14.6-3.4,18.8" +
			"c-0.6,6.4,0.6,12.2,3.7,17.1c3,5,11,7.5,23.9,7.5h50.4c8.2,0,14.9-2.4,20-7.3c5.1-4.9,9-13.1,11.7-24.8" +
			"c2.7-11.6,4.4-20.1,5.1-25.3c0.6-6.6-0.3-12.3-2.7-16.8C287.4,262.5,281.7,260.2,273,260.2z",
	"0" : "M100.2,292.7c4.2-14.3,8.2-25.4,12.1-33.5c3.9-8.1,8.2-15.2,12.9-21.2c4.7-6.1,9.5-11.8,14.5-17.3" +
			"c5-5.5,11.4-11.1,19.4-17s16.9-10.8,26.8-14.9c9.9-4.1,19.1-6.7,27.6-7.9c8.5-1.2,21.2-2.1,37.9-2.6l24.1-0.6" +
			"c13.1-0.2,24.1,0.4,33,1.8c8.9,1.4,16.6,3.6,23.2,6.7c6.6,3.1,12.5,6.9,17.8,11.4c5.3,4.5,10.4,10.4,15.5,17.6" +
			"c5,7.2,8.3,14.1,10,20.7c1.6,6.5,2.6,12.6,3,18.2c0.4,5.6,0.2,12.1-0.5,19.5c-0.7,7.4-1.8,14.6-3.2,21.4l-33.4,157.3" +
			"c-3.2,14.8-5.9,25.9-8.2,33.3c-2.3,7.3-6.3,16.7-12,28.1s-11.4,20.4-17.3,26.8c-5.9,6.4-11.2,11.4-16,14.8" +
			"c-4.8,3.4-10.7,6.9-17.7,10.4c-7,3.5-14.2,6.5-21.5,8.9c-7.4,2.4-14.4,4.2-21.1,5.4c-6.7,1.2-16.1,2.2-28.3,2.9" +
			"s-19.6,1.2-22.4,1.2c-7.7,0.2-17.8-0.5-30.5-2.1c-12.7-1.6-21.7-3.1-27.1-4.7c-5.4-1.6-11.5-4.1-18.3-7.8" +
			"c-6.8-3.6-12.5-7.8-17.1-12.5c-4.7-4.7-9.2-10.9-13.7-18.8c-4.5-7.8-7.1-17.3-7.7-28.6c-0.6-11.2-0.6-21.1,0.2-29.7" +
			"c0.8-8.6,2.1-17.7,4.2-27.2L100.2,292.7z M159.1,422.2c-2.4,11.3-4,21.5-4.7,30.6c-0.8,9.1,0.6,16.8,4.1,23.3" +
			"c3.5,6.4,8.2,11.3,14.1,14.5c5.9,3.2,14.9,4.8,27.2,4.8h3.5c8.2,0,16.1-2.2,23.8-6.6s13.2-9.2,16.7-14.4c3.4-5.2,7.1-14.2,10.9-27" +
			"c3.8-12.8,6-20.8,6.7-23.9l21.2-99.6c2-9.6,3.1-19.6,3.1-30.2c0-10.5-1.2-17.5-3.6-20.8c-2.4-3.3-6.6-6.3-12.7-9.1" +
			"c-6-2.7-13.5-4.3-22.4-4.7l-12.8-0.3c-4.3,0-9.7,1.4-16.2,4.1c-6.5,2.7-11.3,5.5-14.5,8.3c-3.1,2.8-6.8,7.2-11,13" +
			"c-4.2,5.9-7.9,17.2-11.3,34L159.1,422.2z",
	tipsArrowA : 'M0,0v-80l40-40v80h100l-40,40h-80z M0,-88l40,-40v-24l-40,40z M0,-128l40,-40v-12l-40,40z', // 原点在箭头的尖头
	tipsArrowB : 'M0,0h80l40-40h-80v-100l-40,40v80z M88,0l40,-40h24l-40,40z M128,0l40,-40h12l-40,40z', // 原点在箭头的尖头
	tipsBeginFill : 'M-16-38l-8,8l-6-6l-6-13l10-10l5,11l-5-11l10-10l5,11l8-8l0,0c-1-0-2.5-1-3.5-2' // 发
			+ 's-2-2-2-4c-0-1-0-3,0-4c0.4-1.3,1-2.4,2-3.3c1-1,2-1.6,3.4-2c0.7,0,1.5-0.3,2-0.3c0.6,0,1.3,0,2,0.3'
			+ 'c1.4,0.4,2.6,1,3.6,2s1.7,2,2,3.5l0,0l4-4l4,10.7L-6.1-47.8L-6-47l22.3-22.3l7,7v16l21.3-0.8l-13,13l-8.3,0.3v8L10.7-13.2l0,0'
			+ 'l-10,10L-16-38z M9.8-14.5l0.3-18.6L1-32.7L9.8-14.5z M7-45.6h3v-3L7-45.6z '
			+ 'M21.3-72l-1.5,1.5L12.3-78l2.5-2.5c-0.4,0-0.7,0-1,0c-0.7,0-1.4,0-2-0.3c-1.4-0.4-2.6-1-3.6-2s-1.6-2-2-3.5' // 送
			+ 's-0.4-2.8,0-4c0.4-1.3,1-2.5,2-3.4c1-1,2-1.6,3.4-2l0,0h-0.4L21.5-106l14.7,2.4l0.5-0.5l-3-14L44-129l3.3,14l5.8-5.8l3.6,11'
			+ 'l-8.4,8.4l1.4,1.4l12-12l3.5,11l-5.4,5.4h17.8l1-1l0.4,1h1L79.4-95l3.3,9l-27,27l-4.3,1l-4,11.3L21.3-72z M44.4-68v-12l-6,6'
			+ 'L44.4-68z M57-74.7l8-8h-8V-74.7z M31-81.3l8.8-8.8l-1.4-1.4l-8.8,8.8L31-81.3z M21.7-88c0,0.3,0,0.5,0,0.8l0.4-0.4L21.7-88z'
			+ 'M19-94.2c0,0,0.3,0,0.4,0.4c1,1,1.7,2,2,3.6c0,0.3,0,0.7,0,1l3.6-3.6L19-94.2z'
			+ 'M78.8-97.3l7.8-7.8l-4.6-4.6l-8.3,8.3L56-119l8.4-8.4l-3.3-3.3l-8.4,8.4l-7.3-7.3l16-16h-0.3l10-10l3.3,1.6' // 弹
			+ 'l2.4-2.4l-1.6-3l9.8-10l1.6,3.3l1.7-1.7l20.3,20.3l-0.8,13l-1.3,1.3l1,1l10-10l3.6,11L115-125l1.7,1.7l-5,12.5l-5.4-5.4l-8.6,8.6'
			+ 'l-0.4-0.4l-0.6,7.8L86-90L78.8-97.3z M92-117l6.7-6.7l-1-1L91-118L92-117z M75-117l6.7-6.7l-7-7v7.6l-2.8,3L75-117z'
			+ 'M120.8,-141.7L119.8,-140.7L113.7,-146.7L113.7,-146.7L108.4,-152L109.3,-153L96.4,-166L95.5,-165' // 幕
			+ 'L89.4,-171L94.3,-176L92.7,-177.6L101.8,-186.7L103.4,-185L115.3,-197L113.6,-198.7L122.7,-207.7L124.4,-206L130.7,-212.4'
			+ 'L133.6,-204.7L134,-205.2L144.7,-194.4L142.3,-186L149.7,-193.4L152.6,-185.6L155,-188L158,-180L164,-174L160.4,-164L153.3,-157'
			+ 'L149,-161.2L148.8,-161L151.8,-158L145.8,-145.3L139.4,-151.7L134.5,-147L137.3,-144L131,-131.3z'
			+ 'M158.4-195.6l-4.7,4.7l-7.5-7.6l4.7-4.7l-8-8l-4.5,4.5l-7.6-7.8l41.8-41.8l4,11.3l-1.6,1.6l8,8l5.6-5.6' // 开
			+ 'l3.8,11.5l-1.8,1.7l14,14l-5,14.5l-19-18.8L168-205.5l14.4,14.4l-5.5,14L158.4-195.6z M160.6-213l12.6-12.6l-8-8L152.6-221'
			+ 'L160.6-213z'
			+ 'M209.5-231l-7.7-1l-15.4-15l-1.7,1.7L177-253l1.7-1.7l-4-4l8.3-8.3l0,0l9-9l4.3,4.3l2.8-2.8l-2.6-5.4' // 始
			+ 'l9.4-9.4l3.7,8l7.7-7.7l17.4,12.3l-1,1l14.6,14.6l-1,12l-10.5,10.5l0,0L226-228.4l-3.4-0.5l0.6,3.3l-10.7,10.7l-3-15.7V-231z'
			+ ' M227-240.5l-8-8l1.3,7L227-240.5z M233.7-251.3l3.6-3.6l-5.6-5.6l-3.6,3.6L233.7-251.3z M203.8-264L203.8-264L203.8-264'
			+ 'L203.8-264z M214-272l2.6-2.6l-5.7-4L214-272z',
	tipsBeginStroke : 'M-1-79c0.5,0,1,0,1.4,0c1,0.3,2,1,2.7,1.5c0.7,1,1,1.6,1.5,2.7c0.3,1,0.3,2,0,3s-1,2-2,2.6' // 发
			+ 'c-0.7,0.7-1.6,1.3-2.6,1.5c-0.5,0-1,0-1.5,0s-1,0-1.5,0c-1-0.3-2-0.8-2.6-1.5s-1-1.6-1.5-2.7c-0.3-1-0.3-2,0-3s0.8-2,1.5-2.5'
			+ 'c0.7-0.7,1.5-1,2.5-1.5C-2.4-79-1.8-79.2-1.3-79.2'
			+ 'M10-76l2.4,6.6l-21,21l2.3,4.7l23-23l5,5V-44l18.3-0.7l-9,9l-9.5,0.4v9'
			+ 'l-9,9L12.5-35l-13.6,0.5l9-9h5v-10l-16,16l11.6,24l-7,7L-15.5-41l-9,9l-4-4l-5.3-11.7l6.6-6.6l5,10.6l3.3-3.3l-5.3-11'
			+ 'l7-7l5,11L10-76 M-1-83L-1-83c-1,0-2,0-2.8,0.4c-1.6,0.5-3,1.3-4,2.5c-1,1-2,2.5-2.4,4'
			+ 'c-0.6,1.8-0.6,3.5,0,5.3c0.4,1.7,1.3,3,2.6,4.5c0.5,0.5,1,1,1.6,1.3l-4,4l-5.5-11l-23,23l6.6,15l7,7'
			+ 'l7.6-7.6L0,0l24.8-24.8v-6.6h7.3l17-17l-24,1v-15l-8.8-8.8l-0.8,0.8l-4-11.8L7-78.7c-0.4-0.6-0.8-1-1.3-1.6l0,0l0,0'
			+ 'c-1-1-2.7-2-4.4-2.5C0.4-83-0.5-83.2-1.3-83.2L-1.3-83z M4-31h4v8L4-31L4-31z'
			+ 'M42.8-125l2.7,11.3l-7,7L36-118.2L42.8-125 M52-117l2,6.7l-9,9l4,4l11.3-11.3l2,6.7l-8,8h20l-8.7,8.7L55-85v11.4' // 送
			+ 'l-6.8,6.8l5-1.3L78-93l2.4,6.7l-26,26l-4.8,1l-3.3,9.4l-25-25l-1.5,1.5l-4.7-4.7l8.3-8.3L44-65.8l2.5-0.7L46.6-85l-9.4,9.4'
			+ 'L32.8-80L43-90.2l-4-4l-10,10l-4.5-4.5L52-117 M22-104l12,2l-7.5,7.5L15.2-97L22-104 M13.7-94.5c0.8,0,1.5,0.1,1.7,0.3'
			+ 'c1,0.4,1.8,0.9,2.5,1.6s1,1.6,1.5,2.6s0.3,2,0,3s-0.8,2-1.5,2.6c-0.7,0.7-1.6,1.3-2.7,1.5c-0.5,0-1,0-1.6,0c-0.5,0-1,0-1.5,0'
			+ 'c-1-0.3-2-0.8-2.6-1.6c-0.7-0.7-1-1.6-1.5-2.7c-0.3-1-0.3-2,0-3s0.8-2,1.5-2.6c0.7-0.7,1.5-1.3,2.5-1.5 M45-132.7l-13.5,13.5'
			+ 'l2.8,13l-13.4-2.3L9.7-97.3c-1,0.5-2,1-3,2l0,0l0,0c-1,1-2,2.6-2.4,4c-0.5,1.8-0.6,3.6,0,5.4c0.5,1.7,1.3,3,2.5,4.4'
			+ 'c1,1,2.3,2,3.7,2.4l-1,1l10.3,10.3l1.5-1.5l26.5,26.5l4.6-13.3l3.7-1l28.6-28.6l-4.4-12.1H64.4l2.7-2.7l-4.7-15l-4.5,4.5l0,0'
			+ 'l-4-12.7l-5.6,5.6L45-132.7L45-132.7z M59-79.7v-1h1L59-79.7L59-79.7z M41-74l1.3-1.3v2.5L41-74L41-74z'
			+ 'M84-166.4l1.6,3.3l2.3-2.3l18,18l-0.7,11.5l-2,2l4,4l9-9l2,6.7l-6.8,6.8l2,2l-3.4,8.5l-4.7-4.7l-8.6,8.6l-4.5-4.5' // 弹
			+ 'l8.6-8.6l-4-4l-8.3,8.3l-23.6-23.6l2-2l-3-1.7l7-7l3.3,1.6l4.4-4.4l-1.6-3L84-166.4 M89-147.5l2.6-2.6l-4.8-5l-2.6,2.6L89-147.5'
			+ 'M98.7-138l2.6-2.6l-8-8l1.4,4.3l-1,1L98.7-138 M80.8-139.3l2.4-2.4l-5-5l-2.4,2.4L80.8-139.3 M90.5-129.6l2.4-2.4l-5.3-5.3'
			+ 'l-2.4,2.4L90.5-129.6 M62-144l10.5,10.5v9l-3.7,3.7l6,6l8.4-8.4l12,12l-0.8,9.7l-8,8L81.9-98l7.8-7.8l-7.4-7.4l-8.3,8.3l-15-15'
			+ 'l8.4-8.4l-6-6l-8.4,8.4l-4.5-4.5L62-144 M85.3-173.2l-12.8,13l1.6,3.3l-0.4,0.4l-3.2-1.5l-28.1,28.4l10.1,10.1L61-128l0.5,0.5'
			+ 'l-8.4,8.4l20.6,20.6l8.3-8.3l1.8,1.8L76-97.2l10.3,10.1l11.8-11.8l0.4-7l7.1-7.1l6.3,6.3l6.7-16.6l-1-1l5.7-5.7l-4.8-15l-8.6,8.6'
			+ 'l0.6-11.3L88.2-170l-1,1L85.3-173.2L85.3-173.2z M74.4-120.4l2-2v-3.6l2,2l-4,4V-120.4L74.4-120.4z'
			+ 'M130-209l1.8,4.8l-4,4l1,1l-2.8,4.6l8-8l8.5,8.5l-3,10l-8,8l1.6,1.6l15.8-15.8l1.7,4.6L139.4-174l7.3-3l7.6-7.6l1.7,4.7' // 幕
			+ 'l-9.6,9.6l-11.4,4.6l-5,11.8l-10,10.3l-3.3-3l7-7l3-7.4l-12.3,12.3l-3-3l15.3-15.3l-1.6-1.6l-14.4,14.4l-12-12l4-4l-2-2l-5,5'
			+ 'l-3.3-3.3l5-5l-1.6-1.6l6-6l1.6,1.6l14.7-14.7l-1.7-1.7l6-6l1.7,1.7L130-209 M104.3-172.6l19-19l-2-2L106.7-179l1,1L104.3-172.6'
			+ ' M109.7-168.6l21.8-21.8l1.3,4l-20.4,20.3l1.8,1.8l22.4-22.4l-6.3-6.3l-22.4,22.4L109.7-168.6 M157-178.3l4.7,4.7l-3,8.5'
			+ 'l-5.4,5.4l-2.8-2.8l4.6-4.6l-1.6-1.5L146-161l3.4,3.4l-4,9l-5.8-5.8l-7.7,7.7l3,3l-4,8.8l-8.6-8.6l14.3-14.3l-2-2l6.5-6.5l2,2'
			+ 'L157-178.3 M131.5-216l-7.1,7.1l-1.7-1.7L111.1-199l1.7,1.7l-9,9l-1.6-1.6l-11.6,11.6l1.6,1.6l-5,5l8.8,9l1-1l10.1,9.9l-1.1,1.1'
			+ 'l14.4,14l1.2-1.2l11,11l7.4-16.4l-2.4-2.4l2-2l7,7l6-12.8l0.8,0.8l8.8-8.8l4.1-11.9l-6.5-6.5l0,0l-3.7-10.6l-2.4,2.4l-2.7-8l-4,4'
			+ 'l0.6-2l-12.2-12.2l-1-3L131.5-216L131.5-216z'
			+ 'M171.5-253l2.6,7l-2,2l11,11l4.7-4.7l2.4,7l-2.3,2l14.7,14.7l-3.6,10.3L180.7-221l-15.4,15.4l15,15l-4,10l-18-18' // 开
			+ 'l-4.7,4.7l-4.7-4.7l4.7-4.7l-11-11l-4.5,4.5l-5-5L171.5-253 M160.6-210.2l15.4-15.4l-11-11l-15.4,15.4L160.6-210.2 M127.8-214.8'
			+ 'l10.4,10.8l4.7-4.7l5.3,5.3l-4.8,4.8l10.3,10.5l4.8-4.8l19.3,19.3l7-18.1L171-205.4l9.8-9.8l19.8,19.8l6.4-18.7l-13.6-13.6l1-1'
			+ 'l-5.2-15.4l-6.6,6.6l-5.3-5.3l1-1l-5.8-15.7L127.8-214.8z M155.3-221l9.8-9.8l5.3,5.3l-9.8,9.8L155.3-221L155.3-221z'
			+ 'M217-287l14,10l-6,6l-4.3-3l2,5l-11,11l-6-6l-7.6-16l6.4-6.4l8.3,17.7l6.3-6.3l-8.6-6L217-287 M233-274l13,13l-0.8,10.4' // 始
			+ 'L232.6-238l-17.8-17.8L233-274 M233.7-248.4l6.4-6.4l-8.5-8.5l-6.4,6.4L233.7-248.4 M191.7-273.4l4.3,4.3l3-3l3,6.8l-1,1l16,16'
			+ 'l1.5,8.3l14,2l-7,7l-5-0.7l1,5l-7.3,7.3l-2.6-13.4l-8.5-1l-16.3-16l-1.7,1.7l-5-5l1.7-1.7l-4-4l6-6l4,4l2.3-2.3l-4.3-4.3'
			+ 'L191.7-273.4 M209.4-241.2l-0.5-2.7l-14-14l-2.3,2.3l14,14L209.4-241.2 M206-293l-12.4,12.4l2.4,5.6l0,0l-0.3,0.3l-4.3-4.3'
			+ 'l-19.9,19.9l4.2,4.2l-1.7,1.7l10.6,10.6l1.7-1.7L201-230l7,0.8l3.4,18l14.1-14.1l-0.3-1.6h1.7l22-22l1-14.4l-14.5-14.5l1-1'
			+ 'l-20.8-14.7l-6.5,6.5l-1-3L206-293L206-293z M231-257l1-1l3,3l-1,1L231-257L231-257z',
};

/**
 * 背景层 0~99
 * 中心部分 UI 背景是 100~199
 * 之后就是 UI 主体 200~999
 * 醒目文本及其它提示类组件 1000~
 */
const z = {
	bg: {
		colorLayer: 0,
		bgLayer: 10,
		spriteLayer: 30,
	},
	seats: {
		list: 100,
	},
	seat: {
		border: 310,
		borderLight: 311,
		borderDark: 310,
		borderTint: 311,
		uname: 399,
		iconBox: 391,
		avatar: 220,
	},
	hpbar: {
		title: 450,
		img: [410],
	},
	tips: {
		// 基础斜率: 300 / 720 = 5 / 12
		main: 1020,
		sub: 1019,
		textFill: 1100,
		textStroke: 1101,
	},
};

/**
 * @param {string} path
 * @returns {Promise}
 */
function loadFont(path) {
	const font = new window.FontFace('FangZheng', `url(${path})`);
	document.fonts.add(font);
	return font.load();
}


export {
	layouts, color, assets, paths, z,
	loadFont, updateAvatar,
};